package com.redwood.report.adapter;

import android.widget.CheckBox;
import android.widget.CompoundButton;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.redwood.report.R;
import com.redwood.report.common.Constant;
import com.redwood.report.entity.JianKongInfo;
import com.redwood.report.entity.JitaiBeen;
import com.redwood.report.entity.bak.been.BaoXiuSearchBeen;
import com.redwood.report.util.Utils;

/**
 *
 * Created by Supeng on 2018/8/23.
 */
//Caption been
public class MainListAdapter extends BaseQuickAdapter<JianKongInfo.InfoBean, BaseViewHolder> {
    public MainListAdapter() {
        //item layout
        super(R.layout.layout_main_item);
    }
    //设置控件数据
    @Override
    protected void convert(final BaseViewHolder helper, final JianKongInfo.InfoBean item) {
        helper.setText(R.id.tv_bianhao,item.getBianhao()+"");
        helper.setText(R.id.tv_name,item.getMingcheng()+" "+item.getXinghao());
        helper.setText(R.id.tv_type,item.getTypedetail()+"");
        helper.setText(R.id.tv_chixvtimer,Utils.timerchixvParse(item.getStartTimer()) + "");
        helper.setText(R.id.tv_caozuoren,item.getCaozuoren().equals("")?"无":item.getCaozuoren()+"");
        helper.setText(R.id.tv_chanliang,item.getChanliang()+"");
        helper.setText(R.id.tv_yunxingh,Utils.getStingToHour(item.getYunxing()));
        helper.setText(R.id.tv_daijih,Utils.getStingToHour(item.getDaiji()));
        helper.setText(R.id.tv_guzhangh,Utils.getStingToHour(item.getJinggao()));
        helper.setText(R.id.tv_lixianh,Utils.getStingToHour(item.getLixian()));
    }
}
